package twentyThreePattern.create5.prototype.section1;

/**
 * 
 * 需要发送出去的邮件账单
 */
public class Mail implements Cloneable {

	// 收件人
	private String receiver;

	// 邮件名称
	private String subject;

	// 称谓
	private String appellation;

	// 邮件内容
	private String contxt;

	// 邮件的尾部，一般都是加上“XXX版权所有”等信息
	private String tail;

	public Mail(AdvTemplate template) {
		this.contxt = template.getAdvContext();
		this.subject = template.getAdvSubject();
	}

	public Mail clone() {
		Mail mail = null;

		try {
			mail = (Mail) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return mail;
	}

	public String getReceiver() {
		return receiver;
	}

	public String getSubject() {
		return subject;
	}

	public String getAppellation() {
		return appellation;
	}

	public String getContxt() {
		return contxt;
	}

	public String getTail() {
		return tail;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public void setAppellation(String appellation) {
		this.appellation = appellation;
	}

	public void setContxt(String contxt) {
		this.contxt = contxt;
	}

	public void setTail(String tail) {
		this.tail = tail;
	}

	@Override
	public String toString() {
		return "Mail [receiver=" + receiver + ", subject=" + subject + ", appellation=" + appellation + ", contxt="
				+ contxt + ", tail=" + tail + "]";
	}

}
